ADD_EXECUTABLE(curltest main.c)

FIND_PACKAGE(CURL)
IF(CURL_FOUND)
   INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIR})
   TARGET_LINK_LIBRARIES(curltest ${CURL_LIBRARY})
ELSE(CURL_FOUND)
    MESSAGE(STATUS ”CURL library not found”)
    INCLUDE_DIRECTORIES(/usr/include) 
    TARGET_LINK_LIBRARIES(curltest curl)
ENDIF(CURL_FOUND)


